package com.lunago.agent.controller;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/auth")
public class AuthController {

//    @PostMapping("/login")
//    public Map<String, Object> login(@RequestParam String username, @RequestParam String password) {
//        // 假设用户名为 "admin"，密码为 "123456"
//        if ("admin".equals(username) && "123456".equals(password)) {
//            String token = JwtUtils.generateToken(username);
//
//            Map<String, Object> response = new HashMap<>();
//            response.put("code", 200);
//            response.put("message", "Login successful");
//            response.put("token", token);
//            return response;
//        } else {
//            Map<String, Object> response = new HashMap<>();
//            response.put("code", 401);
//            response.put("message", "Invalid username or password");
//            return response;
//        }
//    }
}
